# $Id$
# Maintainer: Tobias Powalowski <tpowa@archlinux.org>
# Contributor: drrossum <youremail@domain.com>
pkgname=edac-utils
pkgver=0.18
pkgrel=1
pkgdesc="Userspace helper for Linux kernel EDAC drivers"
arch=(i686 x86_64)
url='https://github.com/grondo/edac-utils'
license=('GPL2')
makedepends=('git')
depends=('perl' 'sysfsutils' 'dmidecode')
backup=('etc/edac/labels.db')
source=(git://github.com/grondo/edac-utils.git#tag=${pkgver}
        edac.service)

build() {
  cd "$srcdir/$pkgname"
  ./configure --prefix=/usr --sbindir=/usr/bin --sysconfdir=/etc --mandir=/usr/share/man --infodir=/usr/share/info
  make
}

package() {
  cd "$srcdir/$pkgname"
  make DESTDIR="$pkgdir/" install
  # remove initscript
  rm -r $pkgdir/etc/init.d
  # add systemd service file
  install -D -m644 $srcdir/edac.service $pkgdir/usr/lib/systemd/system/edac.service
}
md5sums=('SKIP'
         '8580bea9500ba22a44cdacfd0a0bfa8a')
